home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Fractal.h
-
- Used to build: “Fractal 6”
-
- Written by: Jim Cathey July 1985
- Eric Traut November 1994
-
- Description:
- See comments in the file “FractalMain.c” for more
- information.
- */
-
- #include <QDOffscreen.h>
-
- /* Menu information */
- enum {
- kMenuBarID = 128,
- kAppleMenuID = 128,
- kAboutBoxItem = 1,
- kFileMenuID = 129,
- kNewFractalItem = 1,
- kQuitItem = 3,
- kEditMenuID = 130,
- kOptionsMenuID = 131,
- kSetupItem = 1,
- kContinuousItem = 3
- };
-
- /* Window, dialog, and alert constants */
- enum {
- kMainWindowID = 260,
- kAboutBox1DialogID = 256,
- kAboutBoxOKButtonID = 1,
- kAboutBoxMoreButtonID = 2,
- kAboutBox2DialogID = 257,
- kFatalErrorAlertID = 128
- };
-
- /* Setup dialog constants */
- enum {
- kSetUpDialogID = 258,
- kSetUpOKButtonID = 1,
- kSetUpCancelButtonID = 2,
- kSetUpLevelID = 4,
- kSetUpMtnButtonID = 5,
- kSetUpHillsButtonID = 6,
- kSetUpWaterButtonID = 7
- };
-
- /* Style and level constants */
- enum {
- kStyleMountains = kSetUpMtnButtonID,
- kStyleHills = kSetUpHillsButtonID,
- kStyleWater = kSetUpWaterButtonID,
- kMaxLevel = 7,
- kDefaultStyle = kStyleWater,
- kDefaultLevel = 6
- };
-
- enum {
- kMaxXPoint = ((1 << kMaxLevel) + 1),
- kMaxYPoint = ((1 << (kMaxLevel - 1)) + 1)
- };
-
- /* Screen constants */
- enum {
- kOriginalScreenX = 512,
- kOriginalScreenY = 300,
- kNewScreenX = 630,
- kNewScreenY = 434,
- kScaleShift = 5,
- kScreenBoundaryBits = 5,
- kWindowTitleHeight = 16
- };
-
- /* Global variables used in multiple files */
- extern short (*gPointArray)[kMaxXPoint][kMaxYPoint];
- /* The array of points to be subdivided. */
- extern short gContourType; /* Contour type */
- extern short gContourLevel; /* Level of detail */
- extern long gTotalTickCount; /* Total time spent calculating and drawing */
- extern long gTotalFractals; /* Total fractal count */
- extern Boolean gFractalChanged; /* Should this screen update be counted? */
- extern GWorldPtr gOffscreenGWorld; /* GWorld for faster drawing */
- extern PixMapHandle gOffscreenPixMap; /* Offscreen PixMap */
- extern WindowPtr gMainWindow; /* Our one window */
-
-
- void CalcSurface(unsigned short level);
- void PlotData(void);
-
-
-